<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateQrcodesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        //二维码表
        Schema::create('qrcodes', function(Blueprint $table) {
            $table->increments('id')->comment('自增id');
            $table->string('q_key')->nullable()->comment('');
            $table->string('url')->nullable()->comment('');
            $table->integer('is_use')->default(0)->comment('是否使用，0：未使用 1：已使用');
            $table->timestamp('use_time')->nullable()->comment('使用时间');
            $table->integer('status')->default(0)->comment('状态 0：隐藏 1：显示');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
